<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<div class="popup">
	<h3>新消息</h3>
	<a class="button nui-mainbtn" style="left: 10px;"
		href="javascript:isperp.openDialog({contentUrl:'app/message/myMessageBoxView'});">收件箱</a>
	<a class="button " style="right:10px;"
		onclick="$(this).parent().fadeToggle($$.config.fxSpeed)">关闭</a>
	<div class="content mail">
		<ul>
			<c:forEach items="${messages }" var="message">
				<li>
					<div class="avatar">
						<img src="img/elements/mail/mail.png" height=40 width=40 />
					</div>
					<div class="info">
						<strong>${message.sender_name}</strong> <span>${message.title}</span>
						<small><fmt:formatDate value="${message.create_date}"
								pattern="y-M-d H:m" /> </small>
					</div>
					<div class="text">
						<p>
							${message.content}<br>
							<isperp:processEntry businessKey="${message.source_id}"></isperp:processEntry>
						</p>
						<div class="actions">
							<a
								href="javascript:isperp.openDialog({contentUrl:'app/message/receiver/replyEdit?messageId=${message.id}',size:'small'});"
								class="left open-message-dialog">回复</a> <a
								onclick="javascript:var obj=this; $.get('app/message/read/${message.id}',function(){$(obj).parent().parent().parent().slideToggle($$.config.fxSpeed);}); "
								class="red read-info" href="javascript:void(0);">已读</a>
						</div>
					</div>
				</li>
			</c:forEach>
		</ul>
	</div>
</div>
